<f:view xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui"
        xmlns:pm="http://primefaces.org/mobile"
        contentType="text/html"
        renderKitId="PRIMEFACES_MOBILE">
    <script language="javascript" type="text/javascript">
        function back(){
            window.navigate("index.xhtml");
        }
    </script>    
    <pm:page title="Game Android">
        <!-- Lists -->
        <pm:view id="lists">
            <pm:header title="Game Android">
                <f:facet name="left"><p:button value="Back" icon="back" outcome="index?faces-redirect=true"/></f:facet>
            </pm:header>

            <pm:content>
                <h:form id="form">
                    <h3><h:outputText value="Danh sách game" style="color: red;"/></h3>
                    <p:dataList value="#{androidController.items}" var="ad">
                        <f:attribute name="iconSplit" value="true" /> 
                        <p:commandLink action="#{androidController.viewDetail()}">                    
                            <f:attribute name="icon" value="gear" />
                            <p:graphicImage value="#{bundle.root}/#{ad.properties.getProperty('preview')}" style="width: 300px;height: 300px;margin-top: 7px;"/>
                            <h4><h:outputText value="#{ad.properties.getProperty('title.vn')}"/></h4>                                                
                            <p><strong><h:outputText value="#{ad.properties.getProperty('title.en')}" style="color: chocolate"/></strong></p>  
                            <!--<h:outputText styleClass="ui-li-count" value="#{ad.downloadCount}" style="color: green"></h:outputText>-->                                                        
                            <div> <h:outputText value="#{ad.downloadCount}"/> <p:graphicImage value="/images/download-icon.png"/></div>
                        </p:commandLink>              
                    </p:dataList>
                    <br/>
                    <p:commandButton action="#{androidController.moreGame()}" update=":form" value="More game" rendered="#{not androidController.finish}"/>
                </h:form>
            </pm:content>
        </pm:view>
    </pm:page>
</f:view>
